/* eslint-disable no-param-reassign */

const install = (Vue, vm) => {
/**
 * 获取服务器信息
 */
  const serverConfigurationQuery = () => vm.$u.get('/config/configFind');
  /**
   * 查询装备分类
   */
  const queryingDeviceModel = (data) => vm.$u.get('/zhuangbei/getdriverlist', data);

  /**
   * 获取装备名称
   */
  const accessToEquipmentName = (data) => vm.$u.get('/zhuangbei_xin/getdriverlist', data);

  /**
   * 货架查询
   */
  const shelvesQuery = (data) => vm.$u.get('/shelves/shelvesFind', data);

  /**
   * 单位查询
   */
  const unitTheQuery = (data) => vm.$u.get('/department/getAllDepartments', data);

  /**
   * 装备来源查询
   */
  const equipmentSourceQuery = (data) => vm.$u.get('/laiyuan/getdriverlist', data);

  /**
   * 获取库室
   */
  const accessToLibraryRoom = (data) => vm.$u.get('/kushi/getdriverlist', data);

  /**
   * 装备入库
   */

  const equipmentStorage = (data) => vm.$u.post('/zhuangbei_ruku/createdriver', data);

  /**
   * 获取入库数据
   */
  const accessToDataWarehous = (data) => vm.$u.get('/zhuangbei_ruku/getdriverlist', data);
  
  /**
   * 获取到对应的事由
   */
  const forWhyThings = (data) => vm.$u.get('/zhuangbei_shiyou/getdriverlist', data);
  
  /**
   * 初始一次性入库接口
   */
  const initialLibraryStorage = (data) => vm.$u.post('/material/v2_createReserve',data)
  
  /**
   * 获取陪同人
   */
  const accessToAccompanyPeople = (data) => vm.$u.post('/user/getUserList',data)
  
  /**
   * 装备事由出入库
   */
  const equipmentForInsOutsReason = (data) => vm.$u.post('/zhuangbei_ruku/churuadd',data)
  
  /**
   * 
   * 装备维修数据查询
   */
  const equipmentMaintenanceQuery = (data) => vm.$u.get('/zhuangbei_weixiu/getdriverlist',data)
  
  /**
   * 
   * 装备保养数据查询
   */
  const equipmentkeepaliveQuery = (data) => vm.$u.get('/zhuangbei_baoyang/getdriverlist',data)
  
  /**
   * 查询装备型号
   */
  const queryDeviceType = (data) => vm.$u.get('/zhuangbei_xin/getdriverlist',data)
  
  /**
   * 盘点上报
   */
  const inventoryReport = (data) => vm.$u.post('/zhuangbei_ruku/pandiansb',data)
  
  /**
   * 获取所有菜单数据
   */
  const getMenuList = (data) => vm.$u.get('/terminalMenu/basicsAction',data)
  
  vm.$u.api = {
    serverConfigurationQuery,
    queryingDeviceModel,
    accessToEquipmentName,
    shelvesQuery,
    unitTheQuery,
    equipmentSourceQuery,
    accessToLibraryRoom,
    equipmentStorage,
    accessToDataWarehous,
    forWhyThings,
    initialLibraryStorage,
    accessToAccompanyPeople,
    equipmentForInsOutsReason,
    equipmentMaintenanceQuery,
    equipmentkeepaliveQuery,
    queryDeviceType,
    inventoryReport,
    getMenuList
  };
};

export default {
  install,
};
